/**
 * @(#)UserClientInfo2DAOImpl.java 2017年5月3日
 * Copyright(C) 2017 ZHEXIN IT CO.,LTD. All rights reserved.
 */
package org.jsbd.boss.dao.impl;

import edu.hziee.common.queue.IBatchExecutor;
import org.jsbd.boss.dao.INewClientInfoDao;
import org.jsbd.boss.dao.IUserClientInfoDAO;
import org.jsbd.boss.domian.channel.QueryUserClientVo;
import org.jsbd.boss.domian.channel.UserClientInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 客户端信息
 * 
 * @author <a href="mailto:xupengcheng@zhexinit.com" >徐鹏程</a>
 * @version 1.0.0
 */
@Service("newUserClientDao")
public class NewClientInfoDaoImpl extends CrackUserBaseDao implements INewClientInfoDao, IBatchExecutor<UserClientInfo> {
	public static final Logger LOGGER = LoggerFactory.getLogger(NewClientInfoDaoImpl.class);

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.jsbd.boss.dao.IUserClientInfoDAO#selectClientList(java.lang.Integer)
	 */
	@Override
	public List<UserClientInfo> selectClientList(QueryUserClientVo userVo) {
		return super.queryForList("qy_new_client_info.SELECT_CLIENT_LIST", userVo);
	}

	
	/*
	 * (non-Javadoc)
	 * 
	 * @see edu.hziee.common.queue.IBatchExecutor#execute(java.util.List)
	 */
	@Override
	public void execute(List<UserClientInfo> records) {
		super.batchInsert("qy_new_client_info.INSERT_USER_CLIENT", records);
	}

	@Override
	public UserClientInfo selectClientInfo(QueryUserClientVo userVo) {
		return (UserClientInfo) super.queryForObject("qy_new_client_info.SELECT_CLIENT_INFO", userVo);
	}

	@Override
	public List<UserClientInfo> selectRandomClientList(QueryUserClientVo userVo) {
		return super.queryForList("qy_new_client_info.SELECT_RANDOM_CLIENT_LIST", userVo);
	}

	@Override
	public UserClientInfo selectRandomClientInfo(QueryUserClientVo userVo) {
		return (UserClientInfo) super.queryForObject("qy_new_client_info.SELECT_RANDOM_CLIENT", userVo);
	}

}
